package com.yanqu.road.server.logic.system;

import com.yanqu.road.entity.activity.ppl.PplUserData;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.ppl.PplModule;
import com.yanqu.road.server.manger.activity.ppl.PplMgr;

public class SystemOpenPpl extends BaseSystemOpen {

    public SystemOpenPpl(int systemId, GamePlayer player) {
        super(systemId, player);
    }

    @Override
    public void initSystem() {
        PplModule pplModule = player.getModule(PplModule.class);
        PplUserData userData = pplModule.getUserData();
        if (userData == null && PplMgr.isActivityInShowTime()) {
            pplModule.initUserData();
            pplModule.syncEnergy();
        }
    }
}
